let vm = new Vue({
    el: '.page-content',
    data: {
        pageInfo: {},
        user: {},
        id: {}
    },
    methods: {
        selectPage: function (pageNum = 1, pageSize = 5) {

            axios({
                url: `mapper/userFocus/selectPage/${pageNum}/${pageSize}`
            }).then(response => {
                // this.result=response.data.obj;
                this.pageInfo = response.data.obj;
            }).catch(error => {
                console.log(error.message)
            })
        },

        doDelete: function (id) {
            layer.obj=id
            layer.msg('取消关注', {
                time: 20000,
                btn: ['是', '否'],
                yes: () => {
                    axios({
                        url: "mapper/userFocus/doDetele",
                        params:{id:id}
                    }).then(response => {
                        console.log(id)
                        layer.msg("已为你取消关注");
                        this.selectPage();
                    }).catch(error => {

                        layer.msg(error.message)
                    });
                }
            });
        }
    },
    created: function () {
        this.selectPage();
    }

});